package org.springframework.study;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.study.config.SpringConfig;
import org.springframework.study.service.BService;

/**
 * @author: wf
 * @create: 2025/9/13 0:25
 * @description:
 */
@Service
public class TestMethod {
	
	public static void main(String[] args) {
		System.out.println("IOC初始化开始！");
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
//	AService aService = context.getBean(AService.class);
		System.out.println("IOC初始化结束！");
		BService bService = context.getBean(BService.class);
		System.out.println(bService);
//	System.out.println("AService中注入的BService：" + aService.getbService().getClass());
//	aService.getbService().test();
//	System.out.println("AService中注入的BService：" + aService.getbService().getClass());
		
	}
}
